<?php
namespace Hive\Ressource;
/**
 * Contact Group Object.
 *
 * It represant a regroupement of contact. Each contact can be associate to
 * a certain group to handle authorizations.
 *
 * @author Xavier VILAIN
 * @package Hive\Ressource
 *
 * @property string	$grouping	Group Id
 * @property string	$name		Group Name
 */
class Group extends \Fox\Object\Versioned {

	/**
	 * Link To Ressource
	 * @var string
	 */
	const LINK_RESSOURCE = 'ressource';
	
	/**
	 * Link To Users
	 * @var string
	 */
	const LINK_USERS = 'users';
}
\Fox\Dao::infos(Group::className(),new \Fox\Object\Info('ressource_groups', \Fox\Databases::DB_APP));

\Fox\Object\Links::add(\Fox\Dao::link(Group\User::className(), Group\User::LINK_GROUP)
	->to(Group::className(), Group::LINK_USERS)
	->on('grouping')
	->versionFrom());